'use strict'

var ab = [1, 100, 25, 70, 44, 99, 50000]

ab.SoftT = function () {
    for (var j = 0; j < this.length; j++) {
        var item = this[j]
        var idx = 0
        for (var i = j + 1; i < this.length; i++) {
            if (this[i] < item) {
                item = this[i]
                idx = i
            }
        }
        if (this[j] !== item) {
            var a = this[j]
            this[j] = this[idx]
            this[idx] = a
        }
        console.log(ab);
    }
}
ab.SoftT()